public class FlyRun {
    /**
     * 定义两个接口
     */
    public interface Fly{
        void fly();
    }
    public interface Run{
        void run();
    }
    /**
     * 用pig实现同时链接两个接口
     */

    public class Pig implements Fly,Run {
        @Override
        public void fly(){
            System.out.println("会飞的猪");
        }
        @Override
        public void run(){
            System.out.println("会跑的猪");
        }
    }
}
